import * as PIXI from 'pixi.js';
import listener from '../../../listener';
import StageConf from '../../conf/StageConf';
import ScalerUtil from '../../util/ScalerUtil';
import ShapeView from '../item/ShapeView';
import ReferViews from '../../core/ReferViews';

export default class DrawLayer extends PIXI.Sprite{

    shapeView:ShapeView;

    constructor(){
        super();
        
        ReferViews.instance.draw = this;
        this.init();
    }

    init(){
        this.shapeView = new ShapeView([]);
        this.addChild(this.shapeView);
    }

    clear(){
        this.shapeView.clear();
    }

    addPoint(p:PIXI.Point){
        this.shapeView.addPoint(p);
    }

    draw(){
        this.shapeView.draw();
    }
    
}